layer | NN 4 IE n/a DOM n/a | ||
The layer object reflects the LAYER and ILAYER elements. | |||
HTML Equivalent<ILAYER> <LAYER> | |||
Object Model Reference
|
above, below | NN 4 IE n/a DOM n/a | ||
Read-only | |||
Returns a reference to the positionable element whose stacking z-order is above or below the current element. These properties operate in the context of all positionable elements in a document. If the current element is the highest element, the above property returns null. To restrict the examination of next higher or lower elements within a single layer context, see siblingAbove and siblingBelow. To adjust the stacking order with respect to specific objects, see the moveAbove( ) and moveBelow( ) methods. | |||
Examplevar nextHigher = document.myILayer.above | |||
Value Object reference or null. | |||
|
background | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
This property holds an image object whose src property can be set to change the image used for the layer's background. In other words, you must set this property of the object. | |||
Exampledocument.myIlayer.background.src = "images/newlogo.gif" | |||
Value An image object property, such as src. | |||
|
bgColor | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
Background color of the element. While you may set the value with either a hexadecimal triplet or plain-language color value, values returned from the property are for some reason the decimal equivalent of the hexadecimal RGB version. The default behavior is a transparent background created with a bgColor property value of null. | |||
Exampledocument.myIlayer.bgColor = "yellow" | |||
Value A hexadecimal triplet or plain-language color name. Returned values are the decimal equivalent of the hexadecimal value. A value of null sets the background to transparent. |
|||
|
clip | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
Defines a clipping region of a positionable element. This property is treated more like an object in itself in that you adjust its values through six properties: clip.top, clip.left, clip.bottom, clip.right, clip.width, and clip.height. Adjust the side(s) or dimension(s) of your choice. All values represent pixel values. | |||
Exampledocument.myIlayer.clip.width = 150 | |||
Value Integer. | |||
|
left | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
For positionable elements, defines the position of the left edge of an element's box (content plus left padding, border, and/or margin) relative to the left edge of the next outermost block content container. For the relative-positioned layer, the offset is based on the left edge of the inline location of where the element would normally appear in the content. | |||
Exampledocument.myIlayer.left = 45 | |||
Value Integer. | |||
|
name | NN 4 IE n/a DOM n/a | ||
Read-only | |||
The identifier associated with a layer for use as the value assigned to TARGET attributes or as script references to the frame. If no value is explicitly assigned to the ID attribute, Navigator automatically assigns the NAME attribute value to the ID attribute. | |||
Exampleif (document.layers[2].name == "main") { ... } | |||
Value Case-sensitive identifier that follows the rules of identifier naming: it may contain no whitespace, cannot begin with a numeral, and should avoid punctuation except for the underscore character. | |||
|
pageX, pageY | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
The horizontal (x) and vertical (y) position of the object relative to the top and left edges of the entire document. | |||
Exampledocument.myIlayer.pageX = 400 | |||
Value Integer. | |||
|
parentLayer | NN 4 IE n/a DOM n/a | ||
Read-only | |||
Returns a reference to the next outermost layer in the containment hierarchy. For a single layer in a document, its parentLayer is the window object. | |||
Exampleif (parentLayer != window) { ... } | |||
Value Object reference (a layer or window). | |||
|
siblingAbove, siblingBelow | NN 4 IE n/a DOM n/a | ||
Read-only | |||
Return a reference to the positionable element whose stacking z-order is above or below the current element, but only within the context of the shared parentLayer. If the current element is the highest element, the siblingAbove property returns null. To widen the examination of next higher or lower elements to a document-wide context, see above and below. To adjust the stacking order with respect to specific objects, see the moveAbove( ) and moveBelow( ) methods. | |||
Examplevar nextHigher = document.myILayer.siblingAbove | |||
Value Object reference or null. | |||
|
src | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
URL of the external content file loaded into the current element. To change the content, assign a new URL to the property. Assigning a new URL to this property does not work with inline layers (ILAYER elements) in Navigator 4. Instead the current source document is removed, and other page elements can be obscured. Avoid setting this property for inline layers until this problem is fixed. The same goes for the load( ) method. | |||
Exampledocument.myIlayer.src = "swap2.html" | |||
Value Complete or relative URL as a string. | |||
|
top | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
For positionable elements, defines the position of the top edge of an element's box (content plus top padding, border, and/or margin) relative to the top edge of the next outermost block content container. All measures are in pixels. When the element is a relative-positioned inline layer, the offset is based on the top edge of the inline location of where the element would normally appear in the content. | |||
Exampledocument.myIlayer.top = 50 | |||
Value Integer. | |||
|
visibility | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
The state of the positioned element's visibility. Surrounding content does not close the space left by an element whose visibility property is set to hide (or the CSS version, hidden). If you set the property to the CSS syntax values (hidden | visible), they are converted internally to the JavaScript versions and returned from the property in that format. | |||
Exampledocument.myIlayer.visibility = "hide" | |||
Value One of the constant values (as a string): hide | inherit | show. | |||
|
zIndex | NN 4 IE n/a DOM n/a | ||
Read/Write | |||
For a positioned element, the stacking order relative to other elements within the same parent container. | |||
Exampledocument.myIlayer.zIndex = 3 | |||
Value Integer. | |||
|
captureEvents( ) | NN 4 IE n/a DOM n/a | ||
captureEvents(eventTypeList) Instructs the browser to grab events of a specific type before they reach their intended target objects. The object invoking this method must then have event handlers defined for the given event types to process the event. | |||
Returned Value None. | |||
Parameters
|
handleEvent( ) | NN 4 IE n/a DOM n/a | ||
handleEvent(event) Instructs the object to accept and process the event whose specifications are passed as the parameter to the method. The object must have an event handler for the event type to process the event. | |||
Returned Value None. | |||
Parameters
|
load( ) | NN 4 IE n/a DOM n/a | ||||
load("URL", newLayerWidth) This method lets you load a new document into a layer object. It does not work properly in Navigator 4 for ILAYER elements. The existing document is unloaded from the layer, but the new one does not load as you'd expect. There is no satisfactory workaround except to transform the element into a LAYER. | |||||
Returned Value Boolean value: true if the document loading was successful. | |||||
Parameters
|
moveAbove( ), moveBelow( ) | NN 4 IE n/a DOM n/a | ||
moveAbove(layerObject) moveBelow(layerObject) These methods shift the z-order of the current layer to a specific location relative to another, sibling layer. This is helpful if your script is not sure of the precise zIndex value of a layer you want to use as a reference point for the current layer's stacking order. Use moveAbove( ) to position the current layer immediately above the layer object referenced as a parameter. | |||
Returned Value None. | |||
Parameters
|
moveBy( ) | NN 4 IE n/a DOM n/a | ||||
moveBy(deltaX, deltaY) A convenience method that shifts the location of the current element by specified pixel amounts along both axes. To shift along only one axis, set the other value to zero. Positive values for deltaX shift the element to the right; negative values to the left. Positive values for deltaY shift the element downward; negative values upward. This method comes in handy for path animation under the control of a setInterval( ) or setTimeout( ) method that moves the element in a linear path over time. | |||||
Returned Value None. | |||||
Parameters
|
moveTo( ), moveToAbsolute( ) | NN 4 IE n/a DOM n/a | ||||
moveTo(x, y) moveToAbsolute(x, y) Convenience methods that shift the location of the current element to a specific coordinate point. The differences between the two methods show when the element to be moved is nested inside another positioned container (e.g., a layer inside a layer). The moveTo( ) method uses the coordinate system of the parent container; the moveToAbsolute( ) method uses the coordinate system of the page. For a single layer on a page, the two methods yield the same result. | |||||
Returned Value None. | |||||
Parameters
|
releaseEvents( ) | NN 4 IE n/a DOM n/a | ||
releaseEvents(eventTypeList) The opposite of layerObj.captureEvents( ), this method turns off event capture at the layer level for one or more specific events named in the parameter list. | |||
Returned Value None. | |||
Parameters
|
resizeBy( ) | NN 4 IE n/a DOM n/a | ||||
resizeBy(deltaX, deltaY) A convenience method that shifts the width and height of the current element by specified pixel amounts. To adjust along only one axis, set the other value to zero. Positive values for deltaX make the element wider; negative values make the element narrower. Positive values for deltaY make the element taller; negative values make the element shorter. The top and bottom edges remain fixed; only the right and bottom edges are moved. | |||||
Returned Value None. | |||||
Parameters
|
resizeTo( ) | NN 4 IE n/a DOM n/a | ||||
resizeTo(x, y) Convenience method that adjusts the height and width of the current element to specific pixel sizes. The top and left edges of the element remain fixed, while the bottom and right edges move in response to this method. | |||||
Returned Value None. | |||||
Parameters
|
routeEvent( ) | NN 4 IE n/a DOM n/a | ||
routeEvent(event) Used inside an event handler function, this method directs Navigator to let the event pass to its intended target object. | |||
Returned Value None. | |||
Parameters
|